package bg.consulting.labo;

import java.awt.BorderLayout;
import java.awt.GridLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;

import bg.consulting.labo.util.UtilSwing;

public class MainLaboGUI {

	
	private JFrame frame = new JFrame();
	private JPanel panelGlobal = new JPanel(new BorderLayout());
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		MainLaboGUI labo = new MainLaboGUI();
		
	}
	
	public MainLaboGUI() {
		//FileMediaPlayer fileMediaPkaye = new FileMediaPlayer(this.frame);
		FileMediaPlayer fileMediaPlayer = new FileMediaPlayer();
		Microphone micro = new Microphone();
		Recorder recorder = new Recorder();
		//recorder.addDataSourceProvider(micro);
		recorder.addDataSourceProvider(fileMediaPlayer);
		JPanel panelPlayer = new JPanel(new GridLayout(2,0));
		panelPlayer.add(recorder.getPanelGlobal());
		panelPlayer.add(fileMediaPlayer.getPanelGlobal());
		panelGlobal.add(BorderLayout.CENTER,panelPlayer);
		this.frame.add(panelGlobal);
		UtilSwing.initFrame(frame);
		
	}

}
